<template>

  <div>
    <div style="float: right">
      <el-button @click="jiao()" type="success" size="small">收费</el-button>
    </div>
    <br/><br/><br/><br/>
    <div style="float: left">
      <h1>项目明细</h1>
      <div style="height:300px;width:800px">
        <el-table :data="medicList" style="width: 100%;" border>
          <el-table-column align="center" type="index" width="68" label="序号" fixed="left"></el-table-column>
          <el-table-column prop="name" label="收费名称" width="200"></el-table-column>
          <el-table-column prop="price" label="单价" width="70"></el-table-column>
          <el-table-column prop="t_num" label="总量" width="100"></el-table-column>
          <el-table-column prop="size" label="单位" width="80"></el-table-column>
          <el-table-column prop="t_sum" label="总金额" width="80"></el-table-column>
        </el-table>共计：
        <span style="color:red">{{tOrderZhu.sumprice}}</span>元
      </div>
    </div>

    <div style="float: right;width:500px">
      <div>
        <h1>人员信息</h1>
        <div>
          患者卡号：{{tCustomer.cardid}}
          <br />
          患者姓名：{{tCustomer.name}}
          <br />
          患者年龄：{{tCustomer.age}}
          <br />
          患者性别：{{tCustomer.sex==1?'男':'女'}}
          <br />
          患者手机：{{tCustomer.phone}}
          <br />
          账户余额：{{tCustomer.tsum}}
        </div>
      </div>

      <div>
        <h1>接诊信息</h1>
        <div>
          接诊科室：{{ke.name}}
          <br />
          接诊医生：{{tDoctor.name}}
          <br />
          接诊类型：{{tOrderZhu.jzstatic==1?'初诊':'复诊'}}
          <br />
          是否交费：{{tOrderZhu.state==0?'未交费':'已缴费'}}
          <br />
        </div>
      </div>
    </div>
  </div>
</template>


<script>
export default {
  methods: {
    shou() {
      var $this = this;
      this.axios({
        method: "post",
        url: "http://localhost:9999/nacos/tCustomer/shou"
      }).then(function(res) {
        $this.tOrderZhu = res.data.obj.tOrderZhu;
        $this.tDoctor = res.data.obj.tDoctor;
        $this.medicList = res.data.obj.list;
        $this.tCustomer = res.data.obj.tCustomer;
        $this.ke = res.data.obj.tKe;
      });
    },
    jiao(){
      var $this = this;
      $this.$router.push({
        name: "EWM"
      });
    }
  },
  data() {
    return {
      tOrderZhu: {},
      tDoctor: {},
      medicList: [],
      tCustomer: {},
      ke: {}
    };
  },
  mounted() {
    this.shou();
  }
};
</script>
